package com.xiaoyao.myframeapp.mvp.http;


import com.xiaoyao.myframeapp.core.RetrofitFactory;
import com.xiaoyao.myframeapp.core.RetrofitService;

import okhttp3.OkHttpClient;
import retrofit2.Retrofit;

/**
 * @author Administrator
 * @Author xiaoyao
 * @Email xiao80206040@qq.com
 * @Explain
 * @date 2018/7/3 0003
 */
public class Http {

    private static OkHttpClient client;
    //    private static RetrofitFactory retrofitFactory;
    private static RetrofitService retrofitService;
    private static Retrofit retrofit;

    /**
     * @return retrofit的底层利用反射的方式, 获取所有的api接口的类
     */
    public static RetrofitService getRetrofitService() {
        if (retrofitService == null) {
            retrofitService =
                      RetrofitFactory .getInstance();
        }
        return retrofitService;
    }

//    /**
//     * @return retrofit的底层利用反射的方式, 获取所有的api接口的类
//     */
//    public static RetrofitFactory getRetrofitFactory() {
//        if (retrofitFactory == null) {
////            retrofitService = getRetrofit().create(RetrofitService.class);
//            retrofitFactory =
//                    new RetrofitFactory();
//        }
//        return retrofitFactory;
//    }


}
